﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Configuration;

namespace Keleyi.Com.DALFactory
{
    public class DataAccess
    {
        private static readonly string _path = ConfigurationManager.AppSettings["WebDALPath"];
        private static readonly string _namespace = ConfigurationManager.AppSettings["WebDALNameSpace"];

        public static Keleyi.Com.IDAL.IMessage CreateMessage()
        {
            string className = _namespace + ".Message";
            return (Keleyi.Com.IDAL.IMessage)Assembly.Load(_path).CreateInstance(className);
        }

   }
}